package com.example.mask.maskmobilesshop.mappers;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.example.mask.maskmobilesshop.entity.ProductStock;

import java.util.List;
import java.util.Map;

public interface ProductStockMapper extends BaseMapper<ProductStock> {

    /**
     * 查询库存
     * @Title: findBySkuNo
     * @param: @param skuNo
     * @param: @return
     * @param: @throws Exception
     * @return: ProductStock
     */
    ProductStock findBySkuNo (String skuNo);

    /**
     * 根据商品ID查询商品库存信息
     * @Title: findByProductId
     * @param: @param productId
     * @param: @return
     * @param: @throws Exception
     * @return: List<ProductStock>
     */
    List<Map<String, Object>> findByProductId (Long productId) throws Exception;
}
